<ui:composition xmlns="http://www.w3.org/1999/xhtml"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core"
    template="/WEB-INF/templates/template.xhtml">
    
  <ui:define name="title">Event Dom + Listener Atribute</ui:define>
  
  <ui:define name="body">
	  <h:form>
	  	<h:outputText value="Name: " />
	  	<h:inputText value="#{eventDomMB.name}" >
	  		<f:ajax  event="keypress" render="upper-case-name" listener="#{eventDomMB.upperCaseName}"/>
	  	</h:inputText>
	  	<br/><br/>
	  	<h:outputText value="#{eventDomMB.name}" id="upper-case-name" styleClass="red"/> 
	  </h:form>					
  </ui:define>
</ui:composition>